package org.example.springiocdemo.Controller;

import jakarta.annotation.Resource;
import org.example.springiocdemo.Service.UserService;
import org.example.springiocdemo.config.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
    @Autowired
    private UserService userService;
    @Autowired
//    @Qualifier("user2")
    @Resource(name="u1")
    private User user;
    public void hello(){
        System.out.println("hello world");
        userService.hello();
        System.out.println(user);
    }
}
